package com.springbootbooks.controller;

import com.springbootbooks.common.Result;
import com.springbootbooks.pojo.User;
import com.springbootbooks.service.servicelmpl.UserServiceLmpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: lijiafen
 * @Date: 2022/1/21
 * @Time: 19:09
 * @E-amil: 2368044269@qq.com
 */

@RestController
@RequestMapping("/user/")
public class UserController {

    @Autowired
    UserServiceLmpl userServiceLmpl;
    /**
        * @Description: 注册用户
        * @Author: lijiafen
        * @Date: 2022/1/21
        * @time: 19:10
        */
    @RequestMapping("register")
    public Result register(@RequestBody User user)
    {
        return userServiceLmpl.inertUser(user);
    }

}
